package com.example.attendancesystem.Mapper;


import com.example.attendancesystem.Models.Admin;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface AdminsMapper {

    /**
     * @param adminNumber 管理员账号
     * @return 管理员对象集合
     */
    @Select("select admin_id,admin_number,admin_pass,admin_ques,admin_ans,operate_pass from admins where admin_number= #{adminNumber}")
    List<Admin> getAdminByNumber(@Param("adminNumber") String adminNumber);
    
    /**
     * 获取管理员操作密码
     *
     * @param adminNumber 管理员账号
     * @return String类型 管理员操作密码
     */
    @Select("select operate_pass from admins where admin_number= #{adminNumber}")
    String getOPPass(@Param("adminNumber") String adminNumber);
}
